package com.lagou.config;

import com.lagou.constant.RabbitMQConstant;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @Author: qjc
 * @Date: 2021/12/9
 */
@Configuration
public class ExchangeConfig {


    @Bean(name = RabbitMQConstant.EXCHANGE_DLX_NORMAL)
    public DirectExchange dlxNormalExchange() {
        return new DirectExchange(RabbitMQConstant.EXCHANGE_DLX_NORMAL, true, false);
    }

    @Bean(name = RabbitMQConstant.EXCHANGE_DLX)
    public DirectExchange dlxExchange() {
        return new DirectExchange(RabbitMQConstant.EXCHANGE_DLX, true, false);
    }

}
